<div class="page-header">
    <h1>
        Form Edit Sysconfig
        <small>
            <i class="icon-double-angle-right"></i>
            Edit Sysconfig
        </small>
    </h1>
</div>

<?php
if ($this->errmsg) {
    ?>
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>

        <strong>
            <i class="icon-remove"></i>
            Error
        </strong>

        <?php echo $this->errmsg; ?>
        <br />
    </div>
    <?php
}

if ($this->msg) {
    ?>
    <div class="alert alert-info">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>

        <strong>
            <i class="icon-ok"></i>
        </strong>

        <?php echo $this->msg; ?>
        <br />
    </div>
    <?php
}

if (!$this->msg && !$this->errmsg) {
    ?>

    <div class="row">
        <div class="col-xs-11">
            <form id="formAdd" class="form-horizontal" role="form" action="" method="post">
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="sysconfig_name"> Nama Sysconfig </label>

                        <div class="col-sm-9">
                        
                            <input type="text" id="sysconfig_name" name="sysconfig_name" placeholder="Nama Sysconfig" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['sysconfig_name'] )) { echo $this->data['sysconfig_name'];} ?>" required />
                        
			</div>

                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="code"> Isi Angka </label>

                    <div class="col-sm-9">
                        <input type="text" id="int_value" name="int_value" placeholder="Isi Angka" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['int_value'] )) { echo $this->data['int_value'];} ?>" onkeypress='return validateNumber(event)' />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="product_name"> Isi Text </label>

                    <div class="col-sm-9">
                        <input type="text" id="str_value" name="str_value" placeholder="Isi Text" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['str_value'] )) { echo $this->data['str_value'];} ?>"  />
                    </div>
                </div>
                
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <input type="hidden" name="configId" value="<?php echo $this->configId; ?>" />
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        Submit
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="icon-undo bigger-110"></i>
                        Reset
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    

    function validateNumber(evt) {

        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;
        return true;
      }
</script>
<?php } ?>